<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .test{
      width: 200px;
      height: 200px;
      background: blue;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="toggle">toggle</button>
    <div v-if="show" class="test"></div>
  </div>
</body>
<script src="./vue.js"></script>
<script>

  let vm = new Vue({
    el:"#app",
    data:{
      show:true
    },
    methods:{
      toggle(){
        this.show = !this.show
      }
    }
  })







</script>
</html>